package com.arpa.wms.mapper;

import com.arpa.wms.domain.dto.ShopDTO;
import com.arpa.wms.domain.entity.Shop;
import com.arpa.wms.domain.vo.ShopVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * <p>
 * 店铺 Mapper 接口
 * </p>
 *
 * @author LEO
 * @since 2021-2-22
 */
public interface ShopMapper extends BaseMapper<Shop> {

    /**
     * 查询列表
     * @param shopDTO
     * @return
     */
    List<ShopVO> queryList(ShopDTO shopDTO);
    /**
     * 供应商列表
     * @param shipmentCodes
     * @return
     */
    List<Map<String, Object>> getUserloginShipment(@Param("shipmentCodes") List<String> shipmentCodes);
    /**
     * 查询合计,包含总数
     * @param shopDTO
     * @return
     */
    ShopVO queryListSum(ShopDTO shopDTO);

    /**
     * 获取可以刷新token的店铺信息
     * @author liuxr
     * @date 2021/10/25 13:22
     * @return java.util.List<com.arpa.wms.token.mapper.Shop>
     */
    List<Shop> findCanRefreshTokenShop();

    /**
     * 更新承运商token
     * @author liuxr
     * @date 2021/11/5 10:25
     * @param token
     * @param shopCode
     */
    void updateCarrierToken(String token,String shopCode);

    /**
     * 根据店铺code获取承运商code
     * @author liuxr
     * @date 2021/11/5 11:01
     * @param code
     * @return java.util.Set<java.lang.String>
     */
    Set<String> getCarrierCode(String code);

}
